package com.cipe.cmrs.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * <p>
 * Pojo mapping TABLE dbo.AccountCode
 * </p>
 * 
 * <p>
 * Generated at Sat Dec 03 14:39:39 PKT 2011
 * </p>
 * 
 * @author Incepio
 * 
 */
@Entity
@Table(name = "accountcode")
@SuppressWarnings("serial")
public class AccountCode extends BaseAuditEntity {

	@Basic
	@Column(name = "accountcode", length = 100)
	private String					accountCode;
	/**
	 * Attribute description.
	 */
	@Basic
	@Column(name = "accountcodedesc", length = 500)
	private String					description;
	/**
	 * Attribute usageInstructions.
	 */
	@Basic
	@Column(name = "usageinstructions", length = 500)
	private String					usageInstructions;
/*FIXME	@OneToMany(mappedBy = "accountCode")
	private List<Paymentlineitem>	paymentlineitems	= null;*/
	
	/** 
	 *Column accountcodestatus to specify if an account code is active/inactive.
	 * */	
	@Basic
	@Column(name="accountcodestatus")
	private boolean accountStatus;
	public boolean getAccountStatus() {
		return accountStatus;
	}

	public void setAccountStatus(boolean accountStatus) {
		this.accountStatus = accountStatus;
	}	
	
	@Transient
	private List<Paymentrequest>	paymentrequests	= null;

	public List<Paymentrequest> getPaymentrequests() {
		return paymentrequests;
	}

	public void setPaymentrequests(List<Paymentrequest> paymentrequests) {
		this.paymentrequests = paymentrequests;
	}

	/**
	 * @return the accountCode
	 */
	public String getAccountCode() {
		return accountCode;
	}

	/**
	 * @return description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return usageInstructions
	 */
	public String getUsageInstructions() {
		return usageInstructions;
	}

	/**
	 * Get the list of Paymentlineitem
	 */
/*	public List<Paymentlineitem> getPaymentlineitems() {
		return this.paymentlineitems;
	}
*/
	/**
	 * @param accountCode the accountCode to set
	 */
	public void setAccountCode(String accountCode) {
		this.accountCode = accountCode;
	}

	/**
	 * @param description
	 *            new value for description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @param usageInstructions
	 *            new value for usageInstructions
	 */
	public void setUsageInstructions(String usageInstructions) {
		this.usageInstructions = usageInstructions;
	}

	/**
	 * Set the list of Paymentlineitem
	 */
/*	public void setPaymentlineitems(List<Paymentlineitem> paymentlineitems) {
		this.paymentlineitems = paymentlineitems;
	}*/
	public String getDisplayName(){
		return accountCode +" - "+description;
	}
}